package com.ywd.platform.context;

import com.ywd.platform.vo.UserVo;

/**
 *
 */
public class UserContext {

    private static final ThreadLocal<UserVo> userHolder = new ThreadLocal<>();

    public static void setUser(UserVo user) {
        userHolder.set(user);
    }

    public static UserVo getUser() {
        return userHolder.get();
    }

    public static void clearUser() {
        userHolder.remove();
    }
}
